#include <iostream>

class Base
{
public:
    Base(int a):a(a){}
protected:
    int a;
};

class Base1 : virtual public Base
{
public:
    Base1(int a,int b):Base(a),b(b){}
protected:
    int b;
};

class Base2 : virtual public Base
{
public:
    Base2(int a,int c):Base(a),c(c){}
    void show()
    {

    }
public:
    int c;
};

//虚继承 virtual
//单继承 + 组合 -> 多继承
// class Derived : public Base1,public Base2
// {
// public:
//     Derived(int a,int b,int c):Base(a),Base1(a,b),Base2(a,c)
//     {
//         this->c = c;
//     }
// // private:
// //     Base2 b;
// };

class Derived : public Base1
{
public:
    Derived(int a,int b,int c):Base(a),Base1(a,b),d(a,c)
    {
        this->a = a;
        d.c;
        

    }
    void show()
    {
        d.show();
        d.c
    }
    
private:
    Base2 d;
};